package work.zhangjiaxun.day02;

import java.util.Scanner;

public class TwoArray {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.print("请输入那你想要开辟的二维数组的行数：");
        int A = sc.nextInt();
        System.out.print("请输入那你想要开辟的二维数组的列数：");
        int B = sc.nextInt();


        int[][] ta = new int[A][B];

        int a=0;//行标
        int b=0;//列标

        //输入
        while(a<A){
            while(b<B){
                System.out.print("请输入第"+a+","+b+"组数据:");
                ta[a][b]=sc.nextInt();
                b++;
            }
            b=0;
            a++;
        }

        //输出
        a=0;
        b=0;
        while(a<A){
            while(b<B){
                System.out.print(ta[a][b]);
                b++;
            }
            System.out.println();
            b=0;
            a++;
        }
    }
}
